{include file="common/_header-css"}
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red"></span>员工号</label>
                <div class="layui-input-inline">
                    <input type="text" value="{$param.account}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    <span class="x-red">*</span>额外增加分数</label>
                <div class="layui-input-inline">
                    <select name="score">
                        <option value="0.5">0.5</option>
                        <option value="1">1</option>
                        <option value="1.5">1.5</option>
                        <option value="2">2</option>
                        <option value="2.5">2.5</option>
                        <option value="3">3</option>
                        <option value="3.5">3.5</option>
                        <option value="4">4</option>
                        <option value="4.5">4.5</option>
                        <option value="5">5</option>
                    </select>
                </div>
            </div>

            <input type="hidden" name="integral_id" value="{$param.integral_id}">
            <input type="hidden" name="user_id" value="{$param.user_id}">
            <input type="hidden" name="integral_cycle_id" value="{$param.integral_cycle_id}">
            <input type="hidden" name="account" value="{$param.account}">
            <input type="hidden" name="total" value="{$param.total}">

            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <button class="layui-btn" lay-filter="add" lay-submit="">增加</button>
            </div>
        </form>
    </div>
</div>
<script>
    layui.use(['form', 'layer','jquery'],
        function() {
            $ = layui.jquery;
            var form = layui.form,
                layer = layui.layer;

            //监听提交
            form.on('submit(add)',
                function(data) {
                    $.post('{:url(\'integral/integral_add\')}',data.field,function (res) {
                        console.log(res);
                        if (res.code == 200) {
                            layer.alert(res.msg, {icon: 6}, function() {
                                xadmin.father_reload();
                            });
                        }else{
                            layer.msg(res.msg,{icon:5,time:500});
                        }
                    });
                    return false;
                });

        });
</script>
</body>

</html>